//
// Created by PC on 2023/10/12.
// LCM最小公倍数
// 两个数: x*y/GCD=LCM
// OJ: https://www.luogu.com.cn/problem/B3634
// 通过 注意 需要用long long


#include <iostream>

using namespace std;

int GCD(long long,long long);

int main()
{
    long long x=180,y=88;
    x=20,y=15;
    x=2,y=20;
    cin>>x>>y;
    // 先算GCD
    int gcd_num=GCD(x,y);
    cout<<gcd_num<<' '<<(x*y)/gcd_num;
//    cout<<gcd_num;
//    cout<<(x*y)/gcd_num;

    return 0;
}

int GCD(long long  a,long long  b)
{
    if (a<b)
        swap(a,b);
    long long  left = b;
    while(a%b!=0)
    {
        left=a%left;
        a=b;
        b=left;
    }
    return left;
}
